﻿using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;

public class LeftArrowButton : MonoBehaviour {

	public MainController controller;
 
	void Start(){
		
		Button btn = GetComponent<Button> ();
		btn.onClick.AddListener (delegate() {
			this.OnClick();	
		});

	}

	public void OnClick() {

		Button btn = GetComponent<Button> ();

		btn.enabled = false;
	
		controller.Prev ( ()=>{
			btn.enabled = true;
		});

	}

}
